package com.sunwayworld.basemodule.business.batch.resource.impl;

import com.sunwayworld.basemodule.samplemanage.sample.bean.LimsSampleBean;
import com.sunwayworld.framework.data.page.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.sunwayworld.basemodule.business.batch.resource.LimsBatchSampleResource;
import com.sunwayworld.basemodule.business.batch.service.LimsBatchSampleService;
import com.sunwayworld.framework.spring.annotation.GikamBean;
import com.sunwayworld.framework.log.annotation.Log;
import com.sunwayworld.framework.log.annotation.LogModule;
import com.sunwayworld.framework.log.annotation.LogType;
import com.sunwayworld.framework.restful.data.RestJsonWrapperBean;

@LogModule("送检单样本")
@RestController
@GikamBean
public class LimsBatchSampleResourceImpl implements LimsBatchSampleResource {

    @Autowired
    private LimsBatchSampleService limsBatchSampleService;

    @Override
    public LimsBatchSampleService getService() {
        return limsBatchSampleService;
    }

    @Log(value = "新增送检单样本", type = LogType.INSERT)
    @Override
    @RequestMapping(method = RequestMethod.POST)
    public Long insert(RestJsonWrapperBean wrapper) {
        return getService().insert(wrapper);
    }

    @Override
    public void insertSample(RestJsonWrapperBean wrapper) {
        getService().insertSample(wrapper);
    }

    @Override
    public void sampleChoose(RestJsonWrapperBean wrapper) {
        getService().sampleChoose(wrapper);
    }

    @Override
    public void updateSample(RestJsonWrapperBean wrapper) {
        getService().updateSample(wrapper);
    }

    @Override
    public Page<LimsSampleBean> selectBatchSampleInfo(RestJsonWrapperBean wrapper) {
        return getService().selectBatchSampleInfo(wrapper);
    }

    @Override
    public Page<LimsSampleBean> selectBatchSampleInfos(RestJsonWrapperBean wrapper) {
        return getService().selectBatchSampleInfos(wrapper);
    }

    @Override
    public void deleteBatchSamples(RestJsonWrapperBean wrapper) {
        getService().deleteBatchSamples(wrapper);
    }

    @Override
    public LimsSampleBean getBatchSampleInfo(Long id) {
        return getService().getBatchSampleInfo(id);
    }
}
